package org.firefly.tool;

import java.util.Collection;

public class CollectionUtils {

	/**
	 * Collection 是否为空
	 * <p>
	 * Null-safe check if the specified collection is empty.
	 * <p>
	 * => Null returns true.
	 */
	public static boolean isEmpty(final Collection<?> coll) {
		return coll == null || coll.isEmpty();
	}

	/**
	 * Collection 是否不为空
	 * <p>
	 * Null-safe check if the specified collection is not empty.
	 * <p>
	 * => Null returns false.
	 */
	public static boolean isNotEmpty(final Collection<?> coll) {
		return !isEmpty(coll);
	}
}
